<?php
 namespace App\Http\Controllers; use TechOnline\Laravel\Dao\ModelUtil; use TechOnline\Laravel\Http\Response; class SuperPageController extends BaseController { public function index($url) { $url = '/' . $url; $superPage = ModelUtil::get('super_page', ['url' => $url]); if (empty($superPage)) { return Response::send(-1, '页面不存在'); } $superPageItems = ModelUtil::all('super_page_item', ['pageId' => $superPage['id']], ['*'],['sort', 'asc']); ModelUtil::decodeRecordsJson($superPageItems, 'content'); $viewData = []; $viewData['superPage'] = $superPage; $viewData['superPageItems'] = $superPageItems; return $this->_view('superPage', $viewData); } } 